<template>
  <view class="flex-start-center font-size-12 color3">
    <view class="status-circle-icon" :style="{ background: setTagStateStyle(status).color }" style="display: inline-block; margin-bottom: 2px;"></view>
    <view>{{ setTagStateStyle(status).name }}</view>
  </view>
</template>
<script>
export default {
  name: 'RepairState',
  props: {
    status: {
      type: [String, Number],
      default: ''
    }
  },
  data() {
    return {
      isActive: false
    };
  },
  methods: {
    setTagStateStyle(state) {
      if (state === 0) {
        return {
          color: '#808695',
          name: '正常'
        };
      } else if (state === 1) {
        return {
          color: '#2b85e4',
          name: '已呼叫'
        };
      }
    }
  }
};
</script>
<style scoped lang="scss">
.status-circle-icon {
  width: 10rpx;
  height: 10rpx;
  border-radius: 50%;
  margin-right: 8rpx;
}
</style>
